/**
 * @copyright   Kevin
 * @license     LGPL 3.0
 * @author      Kevin
 * @checkout    https://gitee.com/bigearrabbit/KevinQt.git
 * @file        KevinListItem.cpp
 */

// Qt
#include <QDebug>

// std
#include <iostream>

// Kevin
#include "KevinListItem.h"

namespace Kevin {
const int ListItem::count = 5;
//--------------------------------------------------------------------
ListItem::ListItem()
    // clang-format off
    //START KEVIN CAA WIZARD SECTION KevinListItem PARAM CONSTRUCTOR
    : Title(),
      IconSource(),
      Type(),
      IID(),
      SubType(0)
    //END KEVIN CAA WIZARD SECTION KevinListItem PARAM CONSTRUCTOR
// clang-format on
{
}
//--------------------------------------------------------------------
ListItem::~ListItem() {
    // clang-format off
    //START KEVIN CAA WIZARD SECTION KevinListItem PARAM DESTRUCTOR
    //Title = ""; //1
    //IconSource = ""; //2
    //Type = ""; //3
    //IID = ""; //4
    //SubType = 0; //5
    //END KEVIN CAA WIZARD SECTION KevinListItem PARAM DESTRUCTOR

    // clang-format on
}
//--------------------------------------------------------------------
ListItem::ListItem(const ListItem& iOriginal) {
    *this = iOriginal;
}
//--------------------------------------------------------------------
ListItem& ListItem::operator=(const ListItem& iOriginal) {
    // clang-format off
    //START KEVIN CAA WIZARD SECTION KevinListItem PARAM EQUAL
    this->Title = iOriginal.Title;
    this->IconSource = iOriginal.IconSource;
    this->Type = iOriginal.Type;
    this->IID = iOriginal.IID;
    this->SubType = iOriginal.SubType;
    //END KEVIN CAA WIZARD SECTION KevinListItem PARAM EQUAL

    // clang-format on
    return *this;
}
//--------------------------------------------------------------------
void ListItem::clear() {
    *this = Kevin::ListItem();
}
//--------------------------------------------------------------------
void ListItem::dump() const {
    qDebug() << "{" << Title << ", " << Type << ", " << IID << ", " << IconSource << ", " << SubType
             << "}";
}
//--------------------------------------------------------------------
void ListItem::sample() {
    Title      = "My Title";              // 1
    Type       = "MyType";                // 2
    IID        = "com.kevin.MyIID";       // 3
    IconSource = "qrc:/image/myMenu.svg"; // 4
    SubType    = 1;                       // 5
}
} // namespace Kevin
